package com.example.excel.resolve;

import com.example.excel.pojo.BaseRow;
import com.example.excel.pojo.BaseSheet;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;

import java.util.ArrayList;
import java.util.List;

public class ExcelResolveListImpl extends AbsExcelResolveTemplate<List<String>>{

    @Override
    boolean isResolveSheet(BaseSheet<List<String>> baseSheet) {
        return true;
    }

    @Override
    boolean isResolveRow(int rowNum, Row row) {
        return true;
    }

    @Override
    List<String> newInstanceRow(BaseRow<List<String>> baseRow, Row row) {
        return new ArrayList<>();
    }

    @Override
    void resolveCell(BaseRow<List<String>> baseRow, int cellNum, Cell cell, List<String> data) {
        data.add(formatValue(cell, String.class));
    }


}
